# Problem Set 0 — Scratch

> **Official CS50x Problem Set 0** for Week 0: build a fully interactive project in **Scratch**, demonstrating sequencing, conditions, loops, variables, events, and user input.

---

## 🎯 Objective

Design and implement an original, interactive Scratch program that:

1. **Uses multiple sprites** — at least two sprites that interact.
2. **Uses at least three scripts** — three distinct event/control flows.
3. **Uses at least one condition** — an `if` / `if-else` decision block.
4. **Uses at least one loop** — a `repeat` or `forever` block.
5. **Uses at least one variable** — a mutable, named state holder.
6. **Uses at least one sound** — an audio output triggered by an event.
7. **Is original** — your own creative project, not a copy of the reference `src0` examples.

---

## 📂 Official Reference Source (`src0`)

The official lecture distribution ships the following teaching projects in `Source Code/src0/`:

| File | Concept |
|------|---------|
| `hello0.sb3` — `hello4.sb3` | Sequential output & `say` blocks |
| `meow0.sb3` — `meow4.sb3` | Loops: `repeat`, `forever`, nested counts |
| `pet0.sb3`, `pet1.sb3` | Event handling with the Green Flag |
| `Oscartime.sb3` (+ 0–5) | Freefall physics, sensing & variables |
| `Ivy's Hardest Game.sb3` (+ 0–2) | Collision detection & keyboard control |

> ⚠️ **Academic integrity:** These files exist purely as *teaching material*. Your Problem Set 0 submission must be an **original project you design yourself** — build on the *concepts*, not the assets.

---

## 🏛️ AEL Problem-Solving Framework

Follow the engineering discipline used across the AEL citadel:

```
1. Ideate   → 2. Storyboard  → 3. Pseudocode  → 4. Build  → 5. Test  → 6. Refine
```

### Concept Checklist

- [ ] **Input:** keyboard, mouse, or sprite-touch triggers
- [ ] **State:** at least one variable tracked over time
- [ ] **Control flow:** condition(s) changing behaviour
- [ ] **Loop:** repeated execution with exit condition
- [ ] **Feedback:** visual (costume/backdrop change) + audio (sound)
- [ ] **Interaction:** two or more sprites affect each other

---

## 🧭 Suggested Directions

- A **two-player race game** with a score variable and a timer loop.
- A **reaction-time test** driven by random events and a variable clock.
- An **interactive story** where player choices branch via `if-else`.
- A **pong/reflex game** using keyboard events, a loop, and a lives variable.

---

## ✅ Evaluation Rubric (CS50 check-compatible)

| Criterion | Weight |
|-----------|--------|
| Multiple sprites present and interactive | 20% |
| At least three scripts | 20% |
| Conditionals and loops correctly used | 25% |
| Variable(s) meaningfully used | 15% |
| Sound present and triggered | 10% |
| Originality & creativity | 10% |

---

© Ayman Elmasry — AEL Digital Studio™ · AEL Sovereign CS50x 2026-2027
